package com.android.BluethootChess.rules;

import java.util.List;

import android.graphics.Point;

import com.android.BluethootChess.model.GameBoardMatrix;
import com.android.BluethootChess.model.PieceColor;

/**
 * QueenRules clasa care implementeaza interfata PieceRulesInterface si
 * defineste regulile pentru piesa regina.
 * 
 * @see PieceRule
 */
public class NewQueenRules extends PieceRule {

	private NewRookRules rookRule;
	private NewBishopRules bishopRule;

	public NewQueenRules(GameBoardMatrix gameMatrix, PieceColor color) {
		super(gameMatrix, color);
		rookRule=new NewRookRules(gameMatrix,color);
		bishopRule=new NewBishopRules(gameMatrix,color);
	}

	public void setPiecePosition(Point position) {
		piecePosition = position;
		rookRule.setPiecePosition(position);
		bishopRule.setPiecePosition(position);
	}
	
	public List<Point> findAllAvaiblePositions() {
		List<Point> list = rookRule.findAllAvaiblePositions();
		list.addAll(bishopRule.findAllAvaiblePositions());
		return list;
	}
}
